﻿using CommandPattern.Abstractions;
using CommandPattern.Devices;
using System;
using System.Collections.Generic;
using System.Text;

namespace CommandPattern.Commands
{
    public class CarDoorUpCommand : ICommand
    {
        private readonly CarDoor carDoor;
        public CarDoorUpCommand(CarDoor carDoor)
        {
            this.carDoor = carDoor;
        }
        public void Execute()
        {
            //throw new NotImplementedException();
            carDoor.Up();
        }

        public void Undo()
        {
            //throw new NotImplementedException();
            carDoor.Down();
        }
    }
}
